<!--  
/*  This was NOT entirely developed by Nick Heiner 
	Adapted from a template found at: http://www.webresourcesdepot.com/free-admin-template-for-web-applications/
-->


	<!-- not using this for now
	<div class="top-bar">
		<a href="#" class="button">ADD NEW </a>
		<h1>Contents</h1>
		<div class="breadcrumbs">
			<a href="#">Homepage</a><a href="#">Contents</a>
		</div>
	</div>
	<div class="select-bar">
	    <label>
	    	<input type="text" name="textfield" />
	    </label>
	    <label>
			<input type="submit" name="Submit" value="Search" />
		</label>
	</div> --> 
	<div class="table">
		<img src="img/bg-th-left.gif" width="8" height="7" alt="" class="left" />
		<img src="img/bg-th-right.gif" width="7" height="7" alt="" class="right" />
		<form action="addToCart" method="GET">
			<table class="listing" cellpadding="0" cellspacing="0">
				<tr>
				{% for header in headers %}
					<th 
						{% if forloop.first %} class="first" width="177" {% endif %}
						{% if forloop.last %} class="last" {% endif %}
					>{{header}}</th>
				{% endfor %}
				</tr>
				{% for item in items %}
					<tr {% cycle class="bg","" %}>
						<td class="first"><a href="detail?CSIN={{item.CSIN}}">{{item.name}}</a></td>
						<td>${{item.price}}</td>
						{# does this really need to be in the template? poor #}
						<td>{% ifequal item.quantity 0 %} OUT OF STOCK {% else %} {{item.quantity}} {% endifequal %}</td>
				<!--	<td>
							<input type="text" name="{{item.CSIN}}" value="0" />
							<input type="hidden" name="CSIN" value="{{item.CSIN}}" />
						</td> -->
					</tr>
				{% endfor %}
			</table>
		<!-- <input type="submit" value="Add above amounts to cart" /> -->
		<!-- 				<div class="select">
					<strong>Other Pages: </strong>
					<select>
						<option>1</option>
					</select>
			  </div> 
		-->
		</form>
</div>